The number of applications used for, for example, video-on-demand type service including video-conferencing, digital video broadcasting, and video content streaming via the Internet continues to increase. These applications are dependent on the transmission of video data. When the video data is transmitted or recorded, a significant amount of data is transmitted through a conventional transmission channel having a limited bandwidth or is recorded into a conventional recording medium having a limited data capacity. In order to transmit the video data through the conventional transmission channel or record the video data into the conventional recording medium, it is absolutely essential to compress or reduce the amount of digital data.
With this being the situation, multiple video coding standards have been developed for video data compression. Examples of the video coding standards include the standards of the International Telecommunication Union Telecommunication Standardization Sector (ITU-T) standard specified by “H.26X” and the International Standards Organization/International Electrotechnical Commission (ISO/IEC) specified by “MPEG-x”. Currently, the latest and most advanced video coding standard is presented by the H.264/MPEG-4 AVC standard (see Non Patent Literature 1).
The basic coding approach taken by most of these standards is based on predictive coding that includes the following main stages [a] to [d].
[a] In order to perform data compression for each of video frames at the block level, the video frame is divided into blocks.
[b] Temporal and spatial redundancy is determined by predicting an individual block from previously-coded video data.
[c] The determined redundancy is eliminated by reducing the predicted data from the video data.
[d] The rest of the data is compressed by the Fourier transform, quantization, and entropy coding.
According to the existing video coding standard, a prediction mode used for predicting macroblocks is different for each of the blocks. Most of the video coding standards employ motion estimation and motion compensation in order to predict video data from a previously-coded or -decoded frame (inter-frame prediction). Alternatively, block data may be predicted from an adjacent block included in the same frame (intra-frame prediction). The H.264/AVC standard defines some different intra-frame prediction modes for a reference pixel used for prediction or for a direction in which a pixel is to be extrapolated.
FIG. 1A is a diagram showing an example of a relationship between a current block to which intra prediction estimation based on the conventional H.264/AVC standard is applied and a reference pixel. FIG. 1B is a diagram showing prediction directions included in an intra prediction mode set based on the conventional H.264/AVC standard.
As shown in FIG. 1A, a current block 10 having the size of 4 by 4 pixels is predicted by extrapolating thirteen reference pixels 20 located immediately above and left of the current block 10. By this prediction, a predicted block corresponding to the current block 10 is generated. At this time, in order to execute the extrapolation, one of eight possible extrapolation directions (intra-prediction directions) as shown in FIG. 1B is selected. To be more specific, one direction prediction mode is selected from among eight direction prediction modes indicating the respective eight extrapolation directions. Alternatively, a direct-current (DC) prediction mode may be selected. In the DC prediction mode, an average value of the reference pixels 20 is used for predicting the current block 10.
As described, the prediction mode used for prediction is selected from among the multiple prediction modes for each macroblock. Then, the coded current block is compressed by entropy coding and transmitted together with information related to the selected prediction mode. According to the existing video coding standard, an estimated value is predicted as the information related to the selected prediction mode, based on a rule predetermined by the standard. For example, as information indicating an intra prediction mode defined by the H.264/AVC, the estimated value of the intra prediction mode is determined as a small number indicating the prediction method among the intra prediction modes of the previously-coded neighboring blocks.
Then, when the estimated prediction value and the information regarding the current block to be coded agree with each other, only a flag indicating this agreement is transmitted. On the other hand, when the estimated value and the information regarding the current block disagree with each other, the information regarding the current block is transmitted. For example, when the estimated value of the intra prediction mode agrees with the prediction mode that is actually selected at a time of coding, only the flag is transmitted. On the other hand, when the estimated value disagrees with the selected prediction mode, information used for restoring the selected prediction mode is transmitted.
FIG. 2 is a diagram showing an example of a detailed configuration of a setting unit 510, among components of an image coding apparatus based on the conventional H.264/AVC standard. The setting unit 510 estimates a prediction mode and sets a coded value of the prediction mode. FIG. 3 is a diagram showing an example of a detailed configuration of a restoration unit 620, among components of an image decoding apparatus based on the conventional H.264/AVC standard. The restoration unit 620 restores the prediction mode.
As shown in FIG. 2, the setting unit 510 receives coding mode information SMD indicating a coding mode (the intra prediction mode or the inter prediction mode). For example, when intra-picture prediction coding is selected as the coding mode, the coding mode information SMD represents information IPM indicating the intra prediction mode. On the other hand, when inter-picture prediction coding is selected as the coding mode, the coding mode information SMD represents location information (motion vector) MV.
A prediction mode storage memory 511 stores the received coding mode information SMD. A prediction mode estimation unit 512 obtains, using a predetermined means, estimated prediction mode value candidates from among the previously-coded coding mode information pieces received from the prediction mode storage memory 511.
The following describes an example of a method whereby prediction mode estimation units 512 and 624 based on the H.264/AVC standard estimate an estimated prediction mode value MPM of a 4-by-4-pixel block, with reference to FIG. 1A.
In coding and decoding steps, the prediction mode estimation units 512 and 624 obtain, for the current block 10 having the size of 4 by 4 pixels, an intra prediction mode IPM_A of a neighboring block 30 that has been previously coded (or decoded) and an intra prediction mode IPM_B of a neighboring block 40 that has been previously coded (or decoded). Then, according to Expression 1 described below, one of IPM_A and IPM_B that has a smaller value is set as the estimated prediction mode value MPM.MPM=Min(PredModeA,PredModeB)  Expression 1
Here, each of “PredModeA” and “PredModeB” indicates a number of an index specifying the prediction mode used in the neighboring block. Moreover, “Min ( )” is a function that outputs the index having the smaller number.
The prediction mode estimation unit 512 determines the estimated prediction mode value MPM from among the estimated prediction mode value candidates, and outputs the determined estimated prediction mode value MPM.
A mode information generation unit 515 compares the coding mode IPM of the current block to be coded and the estimated prediction mode value MPM. When these modes agree with each other, the mode information generation unit 515 sets a flag indicating the agreement with the estimated prediction mode value MPM to a prediction-coding-mode related signal SSMD. On the other hand, when these modes disagree with each other, the mode information generation unit 515 outputs, as the prediction-coding-mode related signal SSMD, the index of the mode signal other than the corresponding index. The setting method of the mode information generation unit 515 is represented by Expression 2.
[Math. 1]if (MPM==IPM) {Prev_Intra_Pred_Mode_Flag=1}else {Prev_Intra_Pred_Mode_Flag=0if (IPM<MPM) {Rem_Intra_Pred_Mode = IPM}else {Rem_Intra_Pred_Mode = IPM−1}}... Expression 2
As indicated by Expression 2, the coding mode IPM that is the index of the coding mode of the current block is firstly compared with the estimated prediction mode value MPM calculated by Expression 1. When these modes agree with each other, a flag Prev_Intra_Pred_Mode_Flag that indicates whether or not the coding mode IPM agrees with the estimated prediction mode value MPM is set at “1”. Then, this flag is outputted as the prediction-coding-mode related signal SSMD. On the other hand, when the coding mode IPM that is the index of the coding mode of the current block disagrees with the estimated prediction mode value MPM calculated by Expression 1, the flag Prev_Intra_Pred_Mode_Flag is set at “0”. Then, the sizes of indexes are compared. When the index of the coding mode of the current block is smaller than the estimated prediction mode value MPM, information Rem_Intra_Pred_Mode that indicates the coding mode of the current block is set at the value of the coding mode IPM. On the other hand, when the index of the coding mode of the current block is greater than the estimated prediction mode value MPM, the information Rem_Intra_Pred_Mode that indicates the coding mode of the current block is set at a value obtained by subtracting 1 from the value of the coding mode IPM. Then, each of Prev_Intra_Pred_Mode_Flag and Rem_Intra_Pred_Mode is outputted as the signal SSMD.
A variable-length coding unit 520 performs entropy coding on the prediction-coding-mode related signal SSMD, and outputs the resulting signal as a bitstream.
Moreover, as shown in FIG. 3, a variable-length decoding unit 610 decodes the received bitstream and then outputs a quantized frequency transform coefficient QT and prediction-coding-mode related information SSMD.
The restoration unit 620 receives the prediction-coding-mode related signal SSMD, and outputs the coding mode information SMD (that includes the following to be used for decoding: a coding mode MD; and the information indicating the intra prediction mode IPM or the location information (motion vector) MV). To be more specific, a signal determination unit 621 receives the prediction-coding-mode related signal SSMD. Then, when the flag indicating the agreement with the estimated prediction mode value MPM is included in the prediction-coding-mode related signal SSMD, the signal determination unit 621 outputs the intra prediction mode IPM as the estimated prediction mode value MPM. Otherwise, the signal determination unit 621 sets the intra prediction mode IPM from the index information further included in the prediction-coding-mode related signal SSMD, and then outputs the intra prediction mode IPM. The setting method used by the signal determination unit 621 is represented by Expression 3.
[Math. 2]if (Prev_Intra_Pred_Mode_Flag==1) {IPM=MPM}else {if (Rem_Intra_Pred_Mode<MPM) {IPM=Rem_Intra_Pred_Mode}else {IPM = Rem_Intra_Pred_Mode+1}}... Expression 3
As represented by Expression 3, suppose that the flag Prev_Intra_Pred_Mode_Flag indicating whether or not the intra prediction mode agrees with the estimated prediction mode value MPM is read and this flag is set at 0. In this case, the flag Prev_Intra_Pred_Mode_Flag is further read to restore the intra prediction mode IPM.
A prediction mode storage memory 623 stores: the received coding mode MD; and the information indicating the intra prediction mode IPM (such as an intra-prediction block size and an intra-prediction direction) or the location information (motion vector) MV. The prediction mode estimation unit 624 obtains, from the prediction mode storage memory 623, multiple estimated prediction mode value candidates from the previously-decoded coding mode MD and one of the previously-decoded information indicating the intra prediction mode IPM and the previously-decoded location information (motion vector) MV, using a predetermined means as represented by Expression 1.
The prediction mode estimation unit 624 determines the estimated prediction mode value MPM from among the multiple estimated prediction mode value candidates, and outputs the determined estimated prediction mode value MPM.
Meanwhile, a video coding method for compressing video data using edge detection has been proposed as well, and edge detection may be included in a coding apparatus and a decoding apparatus (see Non Patent Literature 2).
With this method, a predicted block corresponding to the current block 10 is generated from prediction made by, in addition to the intra direction prediction based on the H.264/AVC standard, extrapolating the reference pixels 20 on the basis of an angle obtained by edge detection. Moreover, in Non Patent Literature 2, whether or not edge detection is used is indicated by the DC prediction mode that uses the average value of the reference pixels 20. To be more specific, the indexes of the intra prediction modes IPMs indicating DC prediction and edge prediction are the same. When the result of edge detection satisfies a certain condition, the predicted block is generated on the basis of the angle obtained by edge detection. When the result of edge detection does not satisfy the certain condition, the predicted block is generated using the average value. Here, the certain condition is whether or not the size of the edge-detected vector exceeds a certain value.